//
//  TTDetailSectionLabel.m
//  TaoTuo
//
//  Created by admin on 2019/8/24.
//  Copyright © 2019 admin. All rights reserved.
//

#import "TTDetailSectionLabel.h"

@implementation TTDetailSectionLabel

- (instancetype)initWithFrame:(CGRect)frame title:(NSString *)title
{
    self = [super initWithFrame:frame];
    if (self) {
        
        CGFloat y = (self.height - 15) * 0.5;
        UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, y, 3, 15)];
        lineView.backgroundColor = kMainColor;
        [self addSubview:lineView];
        
        
        UILabel *label = [UILabel labelWithTitle:title color:UIColorHex(333333) fontSize:15];
        [label sizeToFit];
        label.frame = CGRectMake(lineView.right + 5, 0, label.width, self.height);
        [self addSubview:label];
        
        self.width = 10 + label.width;
        
    }
    return self;
}


@end
